/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package view;

import connectivity.QueryManager;
import java.sql.ResultSet;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.List;
import java.util.Locale;
import javax.swing.JOptionPane;
import main.BarApplication;
import model.DbUtils;
import model.Factuur;
import model.Member;

/**
 *
 * @author Mamadou
 */
public class FactuurDetail extends javax.swing.JPanel {

    private ResultSet rs;
    QueryManager queryManager = BarApplication.getQueryManager();
    private Member lid;
    private LoginScreen login;
    DecimalFormat df = new DecimalFormat("###.##");

    /**
     * Creates new form FactuurDetail
     */
    public FactuurDetail(LoginScreen login, Member mem) {
        this.lid = mem;
        this.login = login;
        initComponents();

        
        field();


    }

    private void SetData(Object obj, int row_index, int col_index) {
        jTable_productDatail.getModel().setValueAt(obj, row_index, col_index);
    }

    private Object GetData(Object obj, int row_index, int col_index) {
        return jTable_productDatail.getModel().getValueAt(row_index, col_index);
    }
//genereerFactuurLidList//

    //-----------------------------------------------------------------------------
//  Hiermee wordt de TableCususrooster gelinkt aan de database
//------------------------------------------------------------------------------
    private void tableFactuurLidList() {
        String jaar = jComboBox_jaar.getSelectedItem().toString();
        String maand = jComboBox_maand.getSelectedItem().toString();
        queryManager = BarApplication.getQueryManager();
        jTable_productDatail.setModel(DbUtils.resultSetToTableModel(queryManager.genereerFactuurLidList(lid.getMemberId(), jaar, maand)));

    }
//------------------------------------------------------------------------------

    private void tableAbonementLidList() {
        String jaar2 = jComboBox_jaar.getSelectedItem().toString();
        String maand2 = jComboBox_maand.getSelectedItem().toString();
        queryManager = BarApplication.getQueryManager();
        jTable_abonement.setModel(DbUtils.resultSetToTableModel(queryManager.genereerAbonementLidList(lid.getMemberId(), jaar2, maand2)));
        //jTable_productDatail.removeColumn(jTable_productDatail.getColumnModel().getColumn(0)); // REMOVE FISRT COLUMN 
    }

    private void field() {

//        jTextFieldIdLid.setText(Integer.toString(lid.getMemberId()));
//        if (lid.getMiddlename().trim().equals(" ")) {
//
//            jTextFieldVoornaam.setText(lid.getFirstname() + " " + lid.getLastname());
//        } else {
//
//            jTextFieldVoornaam.setText(lid.getFirstname() + " " + lid.getMiddlename() + " " + lid.getLastname());
//        }

        jLabel5.setText("lidnummer: " + lid.getMemberId());
        jLabel6.setText(lid.getFirstname() + " " + lid.getMiddlename() + " " + lid.getLastname());
        jLabel8.setText(lid.getAddress());
        jLabel11.setText(lid.getZip_code() + " " + lid.getResidence());

    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        jTable_productDatail = new javax.swing.JTable();
        jLabel4 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTable_abonement = new javax.swing.JTable();
        jPanel2 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jComboBox_jaar = new javax.swing.JComboBox();
        jComboBox_maand = new javax.swing.JComboBox();
        jButton1 = new javax.swing.JButton();
        jPanel5 = new javax.swing.JPanel();
        home = new javax.swing.JLabel();
        leden1 = new javax.swing.JLabel();
        activiteit1 = new javax.swing.JLabel();
        bar1 = new javax.swing.JLabel();
        factuur1 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        jLabel11 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        totaal_bedrag = new javax.swing.JLabel();

        setBackground(new java.awt.Color(255, 255, 255));
        setMinimumSize(new java.awt.Dimension(960, 360));
        setName(""); // NOI18N
        setPreferredSize(new java.awt.Dimension(960, 508));

        jTable_productDatail.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Producten", "Aantal", "Prijs per stuk", "Totaal"
            }
        ));
        jTable_productDatail.setShowVerticalLines(false);
        jScrollPane1.setViewportView(jTable_productDatail);

        jLabel4.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel4.setForeground(new java.awt.Color(102, 102, 102));
        jLabel4.setText("Producten");

        jLabel7.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel7.setForeground(new java.awt.Color(102, 102, 102));
        jLabel7.setText("Soort abonnement");

        jTable_abonement.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {}
            },
            new String [] {

            }
        ));
        jTable_abonement.setMaximumSize(new java.awt.Dimension(700, 16));
        jTable_abonement.setShowVerticalLines(false);
        jScrollPane2.setViewportView(jTable_abonement);

        jPanel2.setBackground(new java.awt.Color(204, 255, 204));

        jLabel1.setText("Jaar");

        jLabel2.setText("Maand");

        jComboBox_jaar.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Selecteer een jaar", "2012", "2013", " " }));

        jComboBox_maand.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Selecteer een maand", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" }));

        jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/size32/invoice-icon.png"))); // NOI18N
        jButton1.setText("Genereer Factuur");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel2)
                            .addComponent(jLabel1))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jComboBox_jaar, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jComboBox_maand, 0, 145, Short.MAX_VALUE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(jButton1)))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jComboBox_jaar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(jComboBox_maand, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(jButton1)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        home.setText("Home");
        home.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        home.setFocusCycleRoot(true);
        home.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                homeMouseClicked(evt);
            }
        });

        leden1.setText("Leden");
        leden1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        leden1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                leden1MouseClicked(evt);
            }
        });

        activiteit1.setText("Activiteit");
        activiteit1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        activiteit1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                activiteit1MouseClicked(evt);
            }
        });

        bar1.setText("Bar");
        bar1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        bar1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                bar1MouseClicked(evt);
            }
        });

        factuur1.setText("Factuur");
        factuur1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        factuur1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                factuur1MouseClicked(evt);
            }
        });

        jLabel9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/size32/Apps-session-logout-icon.png"))); // NOI18N
        jLabel9.setText("logout");
        jLabel9.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel9MouseClicked(evt);
            }
        });

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(home)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(leden1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(activiteit1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(factuur1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(bar1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel9)
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                .addContainerGap(20, Short.MAX_VALUE)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(home)
                    .addComponent(leden1)
                    .addComponent(activiteit1)
                    .addComponent(bar1)
                    .addComponent(factuur1))
                .addContainerGap())
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addComponent(jLabel9)
                .addGap(0, 0, Short.MAX_VALUE))
        );

        jLabel3.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel3.setText("Te betalen");

        jPanel1.setBackground(new java.awt.Color(255, 255, 255));

        jLabel11.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel11.setForeground(new java.awt.Color(102, 102, 102));
        jLabel11.setText("jLabel11");

        jLabel5.setBackground(new java.awt.Color(204, 204, 204));
        jLabel5.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel5.setForeground(new java.awt.Color(102, 102, 102));
        jLabel5.setText("jLabel5");

        jLabel8.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel8.setForeground(new java.awt.Color(102, 102, 102));
        jLabel8.setText("jLabel8");

        jLabel6.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel6.setForeground(new java.awt.Color(102, 102, 102));
        jLabel6.setText("jLabel6");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(600, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel5)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel6)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel8)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel11)
                .addContainerGap())
        );

        totaal_bedrag.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        totaal_bedrag.setText("€ 0.00");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(1, 1, 1)
                        .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(0, 0, Short.MAX_VALUE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addComponent(jLabel3)
                                .addGap(18, 18, 18)
                                .addComponent(totaal_bedrag, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jScrollPane2)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(37, 37, 37)
                                .addComponent(jLabel7)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel3)
                                    .addComponent(totaal_bedrag))
                                .addGap(16, 16, 16)))
                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(243, 243, 243)
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 203, Short.MAX_VALUE))
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
//        if (jComboBox_jaar.getSelectedIndex() == 0) {
//            JOptionPane.showMessageDialog(this, "Selecteer een jaar", "Jaar", JOptionPane.ERROR_MESSAGE);
//        } else {
//            if (jComboBox_maand.getSelectedIndex() == 0) {
//                JOptionPane.showMessageDialog(this, "Selecteer een maand", "Maand", JOptionPane.ERROR_MESSAGE);
//            } else {
//                String jaar = jComboBox_jaar.getSelectedItem().toString();
//                String maand = jComboBox_maand.getSelectedItem().toString();
//                try {
//
//                    queryManager = BarApplication.getQueryManager();
//                    List<Factuur> facturen = BarApplication.getQueryManager().getFactuurNummer(jaar, maand);
//                    for (int i = 0; i < facturen.size(); i++) {
//                        System.out.println("Bezig met generen van factuurnummer: " + facturen.get(i).getFactuurNummer());
//                        int factuurnummer = facturen.get(i).getFactuurNummer();
//                        System.out.println("factuurnummer=" + factuurnummer);
//                        CreatePdfFactuur pdf = new CreatePdfFactuur(queryManager.getFactuurLid(factuurnummer),
//                                queryManager.getBarBonFactuur(factuurnummer) // queryManager.getCursusFactuur(factuurnummer)
//                                );
//                        Thread.sleep(10000);
//                    }
//                } catch (Exception ex) {
//                    System.out.println("Problemen bij generenen facturen: " + ex);
//                }
//                System.out.println("Done!");
//            }
//        }
        tableFactuurLidList();
        tableAbonementLidList();
        
        double obj1 = 0;
        int col_index = jTable_abonement.getColumnCount() - 1;
        int row_index = jTable_abonement.getRowCount() - 1;
        if (row_index >= 0 && col_index > 0) {
            obj1 = Double.parseDouble(jTable_abonement.getModel().getValueAt(row_index, col_index).toString());
            System.out.println(obj1);
        }



        double obj2 = 0;
        int j = jTable_productDatail.getColumnCount() - 1;
        int rows = jTable_productDatail.getRowCount();
        for (int i = 0; i < rows; i++) {
            obj2 += Double.parseDouble(GetData(jTable_productDatail, i, j).toString());
        }
        // SetData(new Double(obj1),rows-1,j);
        double totaal = obj1 + obj2;

        totaal_bedrag.setText("€ " + String.format("%1$,.2f", totaal));

    }//GEN-LAST:event_jButton1ActionPerformed

    private void homeMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_homeMouseClicked
        // TODO add your handling code here:
        BarApplication.getInstance().showPanel(new Home(login));
    }//GEN-LAST:event_homeMouseClicked

    private void leden1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_leden1MouseClicked
        BarApplication.getInstance().showPanel(new MemberOverview(login));
    }//GEN-LAST:event_leden1MouseClicked

    private void activiteit1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_activiteit1MouseClicked

        BarApplication.getInstance().showPanel(new GroupActivityOverview(login));

    }//GEN-LAST:event_activiteit1MouseClicked

    private void bar1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_bar1MouseClicked

        if (evt != null) {
            BarApplication.getInstance().showPanel(new shopping_bar(login));
        }
    }//GEN-LAST:event_bar1MouseClicked

    private void factuur1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_factuur1MouseClicked
        if (evt != null) {
            BarApplication.getInstance().showPanel(new FactuurOverview(login));
        }
    }//GEN-LAST:event_factuur1MouseClicked

    private void jLabel9MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel9MouseClicked
        // TODO add your handling code here:
        BarApplication.getInstance().showPanel(new LoginScreen());
    }//GEN-LAST:event_jLabel9MouseClicked
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel activiteit1;
    private javax.swing.JLabel bar1;
    private javax.swing.JLabel factuur1;
    private javax.swing.JLabel home;
    private javax.swing.JButton jButton1;
    private javax.swing.JComboBox jComboBox_jaar;
    private javax.swing.JComboBox jComboBox_maand;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    public javax.swing.JPanel jPanel5;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JTable jTable_abonement;
    private javax.swing.JTable jTable_productDatail;
    private javax.swing.JLabel leden1;
    private javax.swing.JLabel totaal_bedrag;
    // End of variables declaration//GEN-END:variables
}
